-
Notifications
You must be signed in to change notification settings - Fork 0
Version 1.4.0 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ll ZiggyAlloc allocators ✅ Added AllocatorComprehensiveTests.cs: - 26 comprehensive test methods covering all allocator types - SystemMemoryAllocator, AlignedAllocator, NumaAwareAllocator tests - SlabAllocator, HybridAllocator, ThreadLocalMemoryPool tests - Cross-allocator compatibility and memory safety validation - Stress testing with 5000+ allocation cycles per allocator - Edge case coverage (zero/negative sizes, very large allocations) - Factory method and singleton behavior testing - Proper resource management with try-finally disposal patterns ✅ Added OptimizationTests.cs: - 17 test methods validating all performance optimizations - Lock-free algorithm correctness and thread safety - SIMD operations and hardware acceleration validation - Dynamic optimization and performance regression testing 🔧 Fixed compilation issues: - Removed Vector128<T> usage requiring System.Numerics reference - Implemented proper IDisposable handling for allocator cleanup - Added resource management to prevent memory leaks during testing 📝 Updated CHANGELOG.md: - Documented comprehensive test suite with detailed breakdown - Added note about test framework resource constraints - Technical enhancements section updated with disposal patterns 🧪 Test Coverage: - Individual tests: ✅ Working (confirmed 10/10 SystemMemoryAllocator tests) - Optimization tests: ✅ Working (17/17 tests) - Basic functionality: ✅ Working (3/3 tests) - Resource management: ✅ Proper disposal implemented - Note: Large test batches may encounter test framework constraints
- Removed non-existent [1.4.0] - 2025-10-04 section - Moved relevant content to [Unreleased] section - Enhanced [Unreleased] with proper Technical Enhancements and Performance Improvements - Maintained proper version chronology: [1.3.0] → [Unreleased] → [1.2.6] → ... - All comprehensive test suite and optimization information now properly categorized under [Unreleased]
|
Caution Review failedThe pull request is closed. WalkthroughIntroduces new allocators (AlignedAllocator, NumaAwareAllocator, ThreadLocalMemoryPool) with supporting core utilities, updates existing allocators to centralized constants and new SIMD ops, adds factory methods, expands benchmarks and scripts (incl. interactive selector), renames ScopedMemoryAllocator→ScopedAllocator and DebugMemoryAllocator→DebugAllocator across docs/tests/benchmarks, bumps versions to 1.4.0, and adjusts CI test-skip messaging. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor App
participant Z as Z (Factory)
participant AA as AlignedAllocator
participant Base as Base Allocator
App->>Z: CreateAlignedAllocator(strategy/custom)
Z-->>App: AlignedAllocator
App->>AA: Allocate<T>(count, zeroMemory?)
AA->>AA: Determine alignment (strategy/CPU/cache line)
AA->>Base: Allocate<T>(count, zeroMemory)
alt Pointer not aligned
AA->>AA: Allocate padded region and compute aligned ptr
AA->>AA: Track mapping (aligned->base)
end
AA-->>App: UnmanagedBuffer<T>/Aligned view
App->>AA: Free(ptr)
alt Tracked aligned ptr
AA->>AA: Resolve base ptr
AA->>Base: Free(base ptr)
else Base-owned
AA->>Base: Free(ptr)
end
sequenceDiagram
autonumber
actor App
participant Z as Z (Factory)
participant NA as NumaAwareAllocator
participant Node as NodeAllocator[n]
participant Base as Base Allocator
App->>Z: CreateNumaAwareAllocator(base)
Z-->>App: NumaAwareAllocator
App->>NA: Allocate<T>(count, zero?)
NA->>NA: Detect current thread's NUMA node
NA->>Node: Allocate<T>(count, zero?)
Node->>Base: Allocate<T>(...)
Node-->>NA: Buffer
NA-->>App: Buffer
App->>NA: Free(ptr)
NA->>Node: TryFree(ptr)
alt Owned by node
Node->>Base: Free(base ptr)
else Unknown owner
NA->>Base: Free(ptr)
end
sequenceDiagram
autonumber
actor App
participant TLP as ThreadLocalMemoryPool
participant TLS as ThreadLocal Pools
participant Shared as Shared Queue
participant Base as Base Allocator
App->>TLP: Allocate<T>(count, zero?)
TLP->>TLS: Try size-class slot
alt Hit
TLS-->>TLP: ptr
else Miss
TLP->>TLS: Try fallback pool
alt Miss
TLP->>Shared: TryGet matching buffer
alt Miss
TLP->>Base: Allocate<T>(...)
end
end
end
TLP-->>App: Buffer
App->>TLP: Free(ptr)
TLP->>TLS: Return to size-class/fallback
alt Not local/doesn't fit
TLP->>Shared: Enqueue for sharing
opt Not share-enabled
TLP->>Base: Free(ptr)
end
end
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (41)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Release v1.4.0: Major Performance Improvements and New Allocators
This pull request introduces significant performance enhancements and three new high-performance memory allocators to ZiggyAlloc v1.4.0.
New Features
ThreadLocalMemoryPool
NumaAwareAllocator
AlignedAllocator
Enhanced Testing and Benchmarking
Comprehensive Test Suite
Advanced Benchmark System
Technical Improvements
Code Quality Enhancements
Performance Optimizations
Files Modified
src/Allocators/AllocatorConstants.csQuality Assurance
This release represents a significant milestone with major performance gains and enhanced functionality for high-performance computing scenarios.
Summary by CodeRabbit
New Features
Optimizations
Documentation
Tests
Chores